import {
	mapGetters
} from 'vuex'
export default {
	computed: {
		...mapGetters('cart', ['total'])
	},
	methods: {
		gettoTal() {
			uni.setTabBarBadge({
				index: 1,
				text: this.total.toString()
			})
		}
	},
	onShow() {
		this.gettoTal()
	},
	watch : {
		total (newVal) {
			this.gettoTal()
		}
	}
}